#define _CRT_SECURE_NO_WARNINGS 1
#include "Sort.h"

void TestInsertSort()
{
	int arr[] = { 2,5,4,9,3,1,7,6,8,0 };
	InsertSort(arr, sizeof(arr) / sizeof(arr[0]));
}

void TestShellSort()
{
	int arr[] = { 2,5,4,9,3,1,7,6,8,0 };
	ShellSort(arr, sizeof(arr) / sizeof(arr[0]));
}

void TestSelectSort()
{
	int arr[] = { 2,5,4,9,3,1,7,6,8,0 };
	SelectSort(arr, sizeof(arr) / sizeof(arr[0]));
}

void TestHeapSort()
{
	int arr[] = { 5, 11, 7, 2, 3, 17 };
	HeapSort(arr, sizeof(arr) / sizeof(arr[0]));
}

void TestBubbleSort()
{
	int arr[] = { 2,5,4,9,3,1,7,6,8,0 };
	BubbleSort(arr, sizeof(arr) / sizeof(arr[0]));
}

void TestPartSort1()
{
	int arr[] = { 2,5,4,9,3,1,7,6,8,0 };
	PartSort1(arr, 0, sizeof(arr) / sizeof(arr[0]) - 1);
}
void TestPartSort2()
{
	int arr[] = { 2,5,4,9,3,1,7,6,8,0 };
	PartSort2(arr, 0, sizeof(arr) / sizeof(arr[0]) - 1);
}

void TestPartSort3()
{
	int arr[] = { 2,5,4,9,3,1,7,6,8,0 };
	PartSort3(arr, 0, sizeof(arr) / sizeof(arr[0]) - 1);
}

void TestQuickSortNonR()
{
	int arr[] = { 2,5,4,9,3,1,7,6,8,0,1 };
	QuickSortNonR(arr, 0, sizeof(arr) / sizeof(arr[0]) - 1);
}

void TestMergeSort()
{
	int arr[] = { 2,5,4,9,3,1,7,6,8,0,1 };
	MergeSort(arr, 0, sizeof(arr) / sizeof(arr[0]) - 1);
}

void TestMergeSortNonR()
{
	int arr[] = { 2,5,4,9,3,1,7,6,8,0, };
	MergeSortNonR(arr, 0, sizeof(arr) / sizeof(arr[0]) - 1);
}

void TestCountSort()
{
	int arr[] = { 2,5,4,9,3,1,7,6,8,0,99,-98 };
	CountSort(arr, sizeof(arr) / sizeof(arr[0]));
}

int main()
{
	//TestInsertSort();
	//TestShellSort();
	//TestSelectSort();
	TestHeapSort();
	//TestBubbleSort();
	//TestPartSort1();
	//TestQuickSortNonR();
	//TestCountSort();

	return 0; 
}
